#lang racket

(define-struct point (x y))

(define (sub n)
  (- n 1)
  )

(define (f x)
  (+ (* 3 (* x x))
     (+ (* -6 x)
     -1))
  )

(define (tabulate-f n)
  (cond
    [(zero? n) empty]
    [else (cons (make-point n (f n))
                (tabulate-f (sub n)))
          ])
  )

(define (dis-tabl a-pos)
  (cond
    [(point? a-pos)
     (display "(")
     (display (point-x a-pos))
     (display ",")
     (display (point-y a-pos))
     (display ")\n")])
  )

(define (show-tabl tabl)
  (cond
    [(empty? tabl) (display "")]
    [else (dis-tabl (first tabl))
          (show-tabl (rest tabl))])
  )

; Test
(show-tabl (tabulate-f 10))
